#include<stdio.h>
int main()
{
	int arr[] = { 3,9,-1,10,-2,99 };
	int j, i;
	int t;
	int arrlen = sizeof(arr) / sizeof(int);
	for (i = 0; i < arrlen; i++)
	{
		for (j = 0; j < arrlen - i; j++)
		{
			if (arr[j] > arr[j + 1])
			{
				t = arr[j];
				arr[j] = arr[j + 1];
				arr[j + 1] = t;
			}
		}
	}
	printf("\n");
	for (j = 0; j < arrlen; j++)
	{
		printf("%d ", arr[j]);
	}
	return 0;
}